package com.hzcx.app.simplechat.ui.friend.bean;

import com.hzcx.app.simplechat.ui.group.bean.GroupInfoBean;
import com.hzcx.app.simplechat.ui.group.bean.MembersBean;

import org.litepal.crud.LitePalSupport;

import java.io.Serializable;

public class FriendCityBean extends LitePalSupport implements Serializable {

    /**
     * id : 5
     * member_id : 9
     * by_member_id : 9
     * remarks_name : 啊啦拉！
     * description : 无
     * state : 1
     * createtime : 1602497590
     * updatetime : 1602579417
     * nickname : 啊啦拉！
     * avatar : http://osscqhzcx.oss-cn-shenzhen.aliyuncs.com/wechat/uploads/20200929/bcec07134d6d1f68f3c0b3552799e237.jpg
     * initials : A
     */

    private int id;
    private int member_id;
    private int by_member_id;
    private String remarks_name;
    private String description;
    private int state;
    private int createtime;
    private int updatetime;
    private String nickname;
    private String avatar;
    private String initials;
    private String membernumber;
    private String hxusername;
    private String chatnumber;
    private boolean isChecked;
    private String online_time;
    private long logintime;
    private String pinyin;

    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

    public String getOnline_time() {
        return online_time;
    }

    public void setOnline_time(String online_time) {
        this.online_time = online_time;
    }

    public long getLogintime() {
        return logintime;
    }

    public void setLogintime(long logintime) {
        this.logintime = logintime;
    }

    public String getChatnumber() {
        return chatnumber;
    }

    public void setChatnumber(String chatnumber) {
        this.chatnumber = chatnumber;
    }

    public String getHxusername() {
        return hxusername;
    }

    public void setHxusername(String hxusername) {
        this.hxusername = hxusername;
    }

    public boolean isChecked() {
        return isChecked;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }

    public String getMembernumber() {
        return membernumber;
    }

    public void setMembernumber(String membernumber) {
        this.membernumber = membernumber;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getMember_id() {
        return member_id;
    }

    public void setMember_id(int member_id) {
        this.member_id = member_id;
    }

    public int getBy_member_id() {
        return by_member_id;
    }

    public void setBy_member_id(int by_member_id) {
        this.by_member_id = by_member_id;
    }

    public String getRemarks_name() {
        return remarks_name;
    }

    public void setRemarks_name(String remarks_name) {
        this.remarks_name = remarks_name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getCreatetime() {
        return createtime;
    }

    public void setCreatetime(int createtime) {
        this.createtime = createtime;
    }

    public int getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(int updatetime) {
        this.updatetime = updatetime;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getInitials() {
        return initials;
    }

    public void setInitials(String initials) {
        this.initials = initials;
    }

    public static FriendCityBean convert(MembersBean membersBean) {
        // TODO: 此处用在群成员禁言使用，顾只转换局部数据，有需求在转换
        FriendCityBean friendCityBean = new FriendCityBean();
        friendCityBean.id = membersBean.getId();
        friendCityBean.member_id = membersBean.getMember_id();
        friendCityBean.avatar = membersBean.getMember().getAvatar();
        friendCityBean.nickname = membersBean.getMember().getNickname();

        return friendCityBean;
    }
}
